package com.shiftl.ui.aroma;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.VerticalPanel;

public class OneButtonDialog extends DialogBox {
	final Button button;
	final HTML htmlLabel;

	public OneButtonDialog(final String title, final String buttonName, final String text) {
		setText("Remote Procedure Call");
		setAnimationEnabled(true);
		button = new Button(buttonName);
		// We can set the id of a widget by accessing its Element
		button.getElement().setId("closeButton");

		htmlLabel = new HTML(text);
		final VerticalPanel dialogVPanel = new VerticalPanel();
		dialogVPanel.addStyleName("dialogVPanel");

		dialogVPanel.add(htmlLabel);

		dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
		dialogVPanel.add(button);
		setWidget(dialogVPanel);
	}

	public Button getButton() {
		return button;
	}

	public HTML getHtmlLabel() {
		return htmlLabel;
	}

}
